package com.xxg.curd;

import java.sql.Connection;
import java.util.List;
import java.util.Map;

/**
 * 快速增删改查
 *
 * 所有方法均只对单表进行操作
 */
public interface Curd {

    boolean createTable(String tableName, Map<String,Object> fieldsAndType);
    boolean dropTable(String tableName);

    boolean add(String tableName, List<Map<String,Object>> params);
    boolean deleteById(String tableName, List<String> ids);
    boolean updateById(String tableName, List<Map<String,Object>> params);

    List<Map<String,Object>> findById(String tableName,List<String> ids);
    List<Map<String,Object>> pageBy(String tableName, int skip, int size, Map<String,Object> where);
}
